package org.apache.servicecomb.fence.resource;

import org.apache.servicecomb.fence.api.resource.VertxResponseInfo;
import org.apache.servicecomb.fence.api.resource.VertxResponseService;
import org.apache.servicecomb.provider.rest.common.RestSchema;
import org.springframework.beans.factory.annotation.Autowired;

@RestSchema(schemaId = "authentication_server_db", schemaInterface = VertxResponseService.class)
public class VertxResponseEndpoint implements VertxResponseService {
    @Autowired
    private VertxResponseLogicService vertxResponseLogicService;


    @Override
    public VertxResponseInfo getResponseInfoById(Long id) {
        return vertxResponseLogicService.getById(id);
    }

    @Override
    public VertxResponseInfo getAsnyResponseInfoById(Long id) {
        return vertxResponseLogicService.getAsnyById(id);
    }
    @Override
    public int insert(String responseInfo) {
        return vertxResponseLogicService.insert(responseInfo);
    }
}
